#include <cstdlib>
#include <iostream>

#define ADADADDDA 121331

using namespace std;

class Asdfgh{
      
      
      private:
               int bad;
      public:
             int a;
             bool change_b(int asd){
                  bad = asd;
                  return true;
             }
      
              int get_b(){
                     return bad;
              }
};

class Trytytka: public Asdfgh{
      protected:
                int d;
      
      public:
             bool set_d(){
                  if(get_b() != -1){
                       d = get_b();
                       return true;
                  }else{
                       return false;
                  }
             }

             int get_d(){
                 return d;
             }
};

class Bomba: public Trytytka{
     public:
            bool make_boom(int a){
                 for(int b = a; b--; b > 0){
                         cout<<"Boom\n";
                         int *c;
                         c = &b;
                         cout<<c;
                 }
                 return true;
            }
};

class This{
      public:
             bool is_Sparta(){
                  return false;
             }
};

bool doa(){
     int a = 1;
     a = 2;
     a = 12313131;
     return true;
}

bool dob(){
     int a = 123131313;
     a = 1;
     a = 2;
     int *b;
     b = &a;
     return true;
}

int do_something_really_big(int someone){
    Bomba bomba[someone];
    int a = 0;
    while(a < someone){
        bomba[a].make_boom(someone);
        This thiss;
        thiss.is_Sparta();
        a++;
    }
    return 485;
}

int just_do_nothing(){
    cout<<"Nothing";
    return 0;
}
    

int main(int argc, char *argv[])
{
    Asdfgh asdfgh;
    asdfgh.change_b(1);
    
    cout<<asdfgh.get_b();
    cout<<"\n";
    
    Trytytka trytytka;
    if (1+1)
       cout<<"2";
    trytytka.change_b(23);
    trytytka.set_d();
    cout<<trytytka.get_d() ;
    cout<<"\n";
    
    srand(time(NULL));
    if(rand() % 10 + 1 > 5)
              doa();
    else
        dob();
        
    srand(time(NULL));
    int a = rand() % ADADADDDA + 1;
    if(a > 0)
              do_something_really_big(a);
    else
        just_do_nothing();
    
    
    Trytytka *wska;
    wska = &trytytka;
    cout<<wska;
    system("PAUSE");
    return EXIT_SUCCESS;
}


